Move some code around
authorMatthias Clasen <mclasen@redhat.com>
Fri, 17 Nov 2017 03:54:26 +0000 (22:54 -0500)
committerMatthias Clasen <mclasen@redhat.com>
Fri, 17 Nov 2017 03:54:26 +0000 (22:54 -0500)
Move gdk_disable_multidevice to gdkdisplaymanager.[hc].

gdk/gdk.c
gdk/gdkdevicemanager.c
gdk/gdkdevicemanager.h
gdk/gdkmain.h

index 2f039c0490abe4b74539a18b231db57fc3744104..a754e0e6929e6301c2f43d024e3ee01f44d470f0 100644 (file)
--- a/gdk/gdk.c
+++ b/gdk/gdk.c
@@ -751,26 +751,3 @@ gdk_set_program_class (const char *program_class)
 
   gdk_progclass = g_strdup (program_class);
 }
-
-/**
- * gdk_disable_multidevice:
- *
- * Disables multidevice support in GDK. This call must happen prior
- * to gdk_display_open(), gtk_init() or
- * gtk_init_check() in order to take effect.
- *
- * Most common GTK+ applications won’t ever need to call this. Only
- * applications that do mixed GDK/Xlib calls could want to disable
- * multidevice support if such Xlib code deals with input devices in
- * any way and doesn’t observe the presence of XInput 2.
- *
- * Since: 3.0
- */
-void
-gdk_disable_multidevice (void)
-{
-  if (gdk_initialized)
-    return;
-
-  _gdk_disable_multidevice = TRUE;
-}
index 9eb395465305729588a1a67337cbead26ebf77aa..91b353d05a6ffa3439a26c42b1883ed6c280b2b0 100644 (file)
@@ -19,6 +19,7 @@
 
 #include "gdkdevicemanagerprivate.h"
 #include "gdkdisplay.h"
+#include "gdkinternals.h"
 #include "gdkintl.h"
 
 
@@ -338,3 +339,23 @@ gdk_device_manager_list_devices (GdkDeviceManager *device_manager,
 
   return GDK_DEVICE_MANAGER_GET_CLASS (device_manager)->list_devices (device_manager, type);
 }
+
+/**
+ * gdk_disable_multidevice:
+ *
+ * Disables multidevice support in GDK. This call must happen prior
+ * to gdk_display_open(), gtk_init() or gtk_init_check() in order to
+ * take effect.
+ *
+ * Most common GTK+ applications won’t ever need to call this. Only
+ * applications that do mixed GDK/Xlib calls could want to disable
+ * multidevice support if such Xlib code deals with input devices in
+ * any way and doesn’t observe the presence of XInput 2.
+ *
+ * Since: 3.0
+ */
+void
+gdk_disable_multidevice (void)
+{
+  _gdk_disable_multidevice = TRUE;
+}
index 554d2d9a43bea9429e13a77deea55a8b4dc4ce7d..7a561099d3dbe02bd1e256d76e5075a63c1b2376 100644 (file)
@@ -41,6 +41,10 @@ GDK_DEPRECATED_IN_3_20
 GList *      gdk_device_manager_list_devices       (GdkDeviceManager *device_manager,
                                                     GdkDeviceType     type);
 
+GDK_AVAILABLE_IN_ALL
+void         gdk_disable_multidevice               (void);
+
+
 G_END_DECLS
 
 #endif /* __GDK_DEVICE_MANAGER_H__ */
index 93a07bd450a4d9e27dcab1235a9b76fe5c798370..c0384b663df00aff8e3c666f1da0a058138c331e 100644 (file)
@@ -55,9 +55,6 @@ G_GNUC_WARN_UNUSED_RESULT gint gdk_error_trap_pop         (void);
 GDK_AVAILABLE_IN_ALL
 void                           gdk_error_trap_pop_ignored (void);
 
-GDK_AVAILABLE_IN_ALL
-void gdk_disable_multidevice (void);
-
 G_END_DECLS
 
 #endif /* __GDK_MAIN_H__ */